module Randomizer
  module ArrayMethods
    def pick_random(max_index=size,modifier=0)
      raise "Invalid maximum index" if max_index > size
      raise "No possible picks available" if max_index < 1
      fetch(Kernel.rand(max_index)+modifier)
    end
  end
end